package com.wzh.controll;

import com.wzh.pojo.Po.UserZp;
import com.wzh.pojo.Resp.DataResp;
import com.wzh.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/UserZp")
public class LoginController {
	@Autowired
	private LoginService loginService;
	@PostMapping("/login")
	@ResponseBody
	public DataResp login(@RequestBody UserZp user){
		System.out.println(user);
		DataResp<Object> resp= loginService.login(user);
		return resp;
	};

	@PostMapping("/register")
	@ResponseBody
	public DataResp register(@RequestBody UserZp user){
		System.out.println(user);
		DataResp<Object> resp= loginService.register(user);
		return resp;
	};



}
